#ifndef _BG_PATH_H_
#define _BG_PATH_H_

#include "math/spline2d.h"

namespace background
{
class BGScene;

class	BGPath
{
public:
							BGPath(int PathID, BGScene* pScene);
							~BGPath();
	void					CreateFromSpline(const math::SplineCache2D& Spline);
	void					RenderDebug(const math::Vec2& Offset, float	Scale);
	void					Tick(float dt);
	bool					HitTest(const math::Vec2& Pos, float Radius = 10/800.0f);
	math::SplineCache2D&	GetSpline() { return m_Spline; };
	math::Vec2				GetPos();	// gets the starting position
	bool					IsLoop();
	static int				Sort(BGPath* pA, BGPath* pB) { return pA->GetID() - pB->GetID(); };
	int						GetID() const { return m_PathID; };

private:
	BGScene*				m_pScene;
	math::SplineCache2D		m_Spline;
	int						m_PathID;

};

} // namespace background

#endif // _BG_PATH_H_